<template>
  <!-- 系统公告页面 -->
  <div class="page-container">
    <el-card class="main-card">
      <template #header>
        <span class="main-title">系统公告</span>
      </template>
      <!-- 公告列表 -->
      <el-timeline style="margin-top: 16px;">
        <el-timeline-item
          v-for="(item, idx) in notices"
          :key="idx"
          :timestamp="item.time"
          placement="top"
          :color="item.important ? '#d32f2f' : '#1976d2'"
          class="timeline-item"
        >
          <span :class="['notice-title', item.important ? 'important' : '']">{{ item.title }}</span>
          <div class="notice-content">{{ item.content }}</div>
        </el-timeline-item>
      </el-timeline>
    </el-card>
  </div>
</template>

<script setup>
import { ref } from 'vue'
// 公告数据（前端模拟）
const notices = ref([
  { title: '端午节放假通知', content: '6月8日至6月10日放假三天，请合理安排就诊。', time: '2024-06-01', important: true },
  { title: '新冠疫苗接种须知', content: '请携带身份证前往门诊大厅接种。', time: '2024-05-28', important: false },
  { title: '门诊时间调整', content: '自6月1日起，门诊时间调整为8:00-17:00。', time: '2024-05-25', important: false }
])
</script>

<style scoped>
.page-container {
  padding: 32px;
  background: linear-gradient(135deg, #e3f0ff 0%, #f5f7fa 100%);
  min-height: 100vh;
}
.main-card {
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(80,120,200,0.10), 0 1.5px 8px 0 rgba(80,120,200,0.08);
  transition: box-shadow 0.3s;
}
.main-card:hover {
  box-shadow: 0 12px 40px 0 rgba(80,120,200,0.16), 0 2px 12px 0 rgba(80,120,200,0.10);
}
.main-title {
  font-size: 22px;
  font-weight: 600;
  color: #1976d2;
  letter-spacing: 1px;
}
.timeline-item {
  font-size: 16px;
  margin-bottom: 18px;
}
.notice-title {
  font-size: 18px;
  font-weight: 600;
  color: #1976d2;
  letter-spacing: 1px;
}
.notice-title.important {
  color: #d32f2f;
  font-weight: 700;
  text-shadow: 0 2px 8px #ffcdd2;
}
.notice-content {
  margin-top: 4px;
  color: #666;
  font-size: 15px;
  padding-left: 2px;
}
</style> 